package br.eti.robsonfranca.clf4j.enums;

public enum ColorCode {
	BLACK,
	RED,
	GREEN,
	YELLOW,
	BLUE,
	MAGENTA,
	CYAN,
	WHITE;
	
	private static final int FOREGROUND = 30;
	private static final int BACKGROUND = 40;
	
	public int value(boolean foreground) {
		return ordinal() + (foreground ? FOREGROUND : BACKGROUND);
	}
}
